<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/3/6
 * Time: 14:38
 */
class car1{
    public $name;
    public function __construct($name)
    {
        $this->name = $name;
    }
    public function clonea(){
        return $this;
    }
}
$car1 = new car1("1");
$car2 = $car1->clonea();
echo $car2->name.PHP_EOL;
var_dump($car1 ===$car2);